package hzn.service.impl;

import bean.UserAddress;
import org.springframework.util.StringUtils;
import service.UserService;

public class UserServiceStub implements UserService {
    UserService service;//是dubbo的代理类

    public UserServiceStub(UserService service) {
        this.service = service;
    }

    @Override
    public UserAddress getUserAddress(String userId) {
        System.out.println("调用本地存根");
        if(!StringUtils.isEmpty(userId)){
            return service.getUserAddress(userId);
        }
        return null;
    }
}
